<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改摄像头')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-liveRoom-edit" th:object="${liveRoom}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">流地址：</label>
                <div class="col-sm-8">
                    <input name="url"  th:field="*{url}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">显示顺序：</label>
                <div class="col-sm-8">
                    <input name="orderNum" th:field="*{orderNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">ip权限：</label>
                <div class="col-sm-8">
                    <input name="ipAuth" th:field="*{ipAuth}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">ip通道号：</label>
                <div class="col-sm-8">
                    <input name="ipChannel" th:field="*{ipChannel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">ip地址：</label>
                <div class="col-sm-8">
                    <input name="ipUrl" th:field="*{ipUrl}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "sso/liveRoom";
        $("#form-liveRoom-edit").validate({
            focusCleanup: true
        });

        var isClick = true;
        function submitHandler() {
            if ($.validate.form() && isClick) {
                isClick = false;
                $.operate.save(prefix + "/edit", $('#form-liveRoom-edit').serialize());
            }
        }

        $("input[name='lastModify']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>